<!DOCTYPE html>
<html>
  <head>
    <title>计算</title>
  </head>
  <body>
    <div>
      <input type="text" id="one" />
      +
      <input type="text" id="two" />
      <button onclick="computNum()">=</button>
      <input type="text" id="thr" />
      <script>
        function computNum() {
          document.getElementById("thr").value =
            Number(document.getElementById("one").value) +
            Number(document.getElementById("two").value);
        }
      </script>
    </div>
  </body>
</html>
